<template>
    <div class="box">
        <!-- <div class="mb"></div> -->
        <!-- 底 导航 -->
        <!-- <footer class="flex-row-wrap">
            <div @click="navBottom(3)">
                <van-icon name="arrow-left" size="2em" />
            </div>
            <div @click="navBottom(2)">
                <van-icon name="wap-home" size="2em" />
            </div>
            <div>
                <a href="tel:0316-8961818">
                
                <van-icon name="service" size="2em" />
                </a>
            </div>
        </footer> -->
    </div>
</template>
<script>
export default {
    data(){
        return{
            title:null,
            scroll: 0,
            show:true
        }
        
    },
    props:['navUrl'],
    created(){
        console.log('this.navUrl-------',this.navUrl)
        if (this.title != this.$router.history.current.meta.title) {
            this.title = this.$router.history.current.meta.title
        }
        
    },
    methods:{
        //返回上一页
        back(){
            this.$router.push(this.navUrl);
        },
        navBottom(v){
            if(v === 3){
                if(this.$route.params.state){
                    if (this.navUrl == 'home') {
                       this.$router.push('/'); 
                    }else{
                        this.$router.push({
                            name: this.navUrl,
                            params: {
                                state:this.$route.params.state
                            }
                        })
                    }
                }else{
                    this.$router.push(this.navUrl);
                }
            }
            if(v === 2){
                this.$router.push('home');
            }
        },
        //监听滚动条
        menu() {
            /* if (this.scroll === 0) {
               this.scroll = document.documentElement.scrollTop || document.body.scrollTop; 
            }else{
                let scroll = document.documentElement.scrollTop || document.body.scrollTop; 
                console.log('scroll-----',scroll)
                if (this.scroll>scroll) {
                    this.show = true
                }else{
                    this.show = false
                }
                this.scroll = scroll
            } */
            
            
        }
    },
    mounted(){
       // window.addEventListener('scroll', this.menu)
    }
}
</script>
<style lang="less" scoped>
    .mb{
        height:2.2rem;
    }
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1.2rem;
        background-color: #27b5a7;
        z-index: 999;
        div {
            flex: 0 0 33.3%;
            text-align: center;
            color: #fff;
            padding-top: 0.2rem;
            img {
                height: 0.4rem;
                margin: 0 auto;
                display: block;
            }
            p {
                /* line-height: 0.64rem; */
                font-size: 0.293rem;
            }
            a {
                text-decoration: none;
                color: #fff;
            }
        }
        div:nth-of-type(1) img {
            width: 0.4rem;
        }
        div:nth-of-type(2) img {
            width: 0.4rem;
        }
        div:nth-of-type(3) img {
            width: 0.4rem;
            height: auto;
        }
    }
</style>